package com.guigu.guliware.exception;

import com.guigu.gulicommon.api.BaseResCode;
import com.guigu.gulicommon.exception.BaseException;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author 陈俊杰
 * @version 1.0
 * @since 2024/9/29 16:55
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class NoHasStockException extends BaseException {
    /**
     * 商品id
     */
    private Long skuId;

    /**
     * 构造函数
     *
     * @param skuId   商品id
     * @param message 错误信息
     */
    public NoHasStockException(Long skuId, BaseResCode message) {
        super(message.getCode(), "id为:" + skuId + "的" + message.getMsg());
    }
}
